home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / intrfc55.arc / TPU55.DOC < prev    next >
Text File  |  1990-02-25  |  3KB  |  89 lines

  1. This is an outline of the structure of the Turbo Pascal 5.5 TPU file format.
  2.  
  3. I. SYMBOL SECTION
  4.  
  5.  This section contains all the symbolic information, and has several 
  6. subsections.  
  7.  
  8. The size is given in header.symsize.  Actual size in file is rounded up to 
  9. next even paragraph, as are all the sections. 
  10.  
  11. A. Header subsection (/H turns display on)
  12.  
  13. Contains sizes, pointers, flags, and signature.  Structure given in HEAD.PAS.
  14. About $40 bytes, but it's not clear where it ends - the last part is always 
  15. zeroed.
  16.  
  17. B. Object subsection (/N turns display off, or /I turns full display on)
  18.  
  19. An unfortunate choice of a name:  this section contains all the symbolic 
  20. information, not just for Objects.  It contains one or two hash tables to get 
  21. access to the various objects:  the interfaced objects are available from the 
  22. one at ofs_hashtable, all debuggable ones are available from the one at
  23. ofs_full_hash.  There are also other smaller hash tables:  members of records, 
  24. locals to functions/procedures, etc.  HASH.PAS decodes the hash table.
  25.  
  26. There are basically two types of records:  obj_rec's and type_def_rec's.  
  27. Obj_rec's give the name and "type", and are followed by specialized 
  28. information describing the object.  Type_def_rec's give constructions for type 
  29. definitions.  Both are given in NAMELIST.PAS and NAMETYPE.PAS, though the 
  30. type_def_rec's should be handled by their own unit.
  31.  
  32. C. Entry point subsection (/E turns display on)
  33.  
  34. This is an array of fixed length records, one per function/procedure/method in
  35. the unit.  It gives the code block of the routine, and the entry point within
  36. that code block.  The first entry is for the initialization section of the
  37. unit.
  38.  
  39. D. Code block subsection (/D turns display on)
  40.  
  41. This is an array of fixed length records, one per block of code (usually, one
  42. per routine, but .OBJ files get just one block).
  43.  
  44. E. Const block subsection (/C turns display on)
  45.  
  46. Another array of fixed length records, one per block of initialized data.
  47. (This will be a typed Const declaration, or the VMT of an object.
  48.  
  49. F. Var block subsection (/V turns display on)
  50.  
  51. The same sort of thing for uninitialized static data.
  52.  
  53. G. Unit list subsection (/U turns display on)
  54.  
  55. All units on which this one depends are listed, in variable length records.
  56.  
  57. F. Source names subsection (not displayed by INTRFC)
  58.  
  59. I haven't worked this out, but it appears to contain filenames & possibly
  60. dates of the source files.
  61.  
  62. G. Line lengths subsection (not displayed by INTRFC)
  63.  
  64. If debugging is turned on, the records here give the correspondence between
  65. source code lines and bytes in the code blocks.
  66.  
  67. II. CODE SECTION (/B turns display on)
  68.  
  69. This section contains the compiled object code, in the order listed in the
  70. code block subsection above.  I don't know if there is any separation between
  71. blocks.
  72.  
  73. III. CONST SECTION (/G turns display on)
  74.  
  75. The initialized data, in the order of the const blocks.
  76.  
  77. IV. CODE RELOCATION RECORDS (/R turns display on)
  78.  
  79. A big array of fixed length records, giving the relocation fixups for the code
  80. blocks.
  81.  
  82. V.  CONST RELOCATION RECORDS (/O turns display on)
  83.  
  84. An array in the same format as IV, giving the relocation fixups for the const
  85. blocks.  Probably only used for fixups for the VMT tables of objects, and the
  86. type pointer at the start of initialized object instances, since constants
  87. can't normally contain addresses.
  88.  
  89.